Imports CapaDeDatos
Public Class nDetalleFactura
    Public DetalleFactura As CapaDeDatos.dDetalleFactura = New CapaDeDatos.dDetalleFactura

    Public Concepto As CapaDeNegocios.nConcepto = New CapaDeNegocios.nConcepto
    Public Function insertar(ByVal Cantidad As Integer, ByVal PrecioUnitario As String, ByVal Subtotal As String, ByVal Total As String, _
                             ByVal idFactura As Integer, ByVal CodigoConcepto As Integer) As Boolean
        Return DetalleFactura.Insertar(Cantidad, PrecioUnitario, Subtotal, Total, idFactura, CodigoConcepto)
    End Function
    Public Function BuscarFiltrado(ByVal idDetalleFactura As String, ByVal Cantidad As String, ByVal PrecioUnitario As String, ByVal Subtotal As String, ByVal Total As String, ByVal idFactura As String, ByVal CodigoConcepto As String) As DataSet
        Dim dts As DataSet = DetalleFactura.BuscarFiltrado(idDetalleFactura, Cantidad, PrecioUnitario, Subtotal, Total, idFactura, CodigoConcepto)
        dts.Tables(0).Columns.Add("Concepto")
        Dim i As Integer
        For i = 0 To dts.Tables(0).Rows.Count - 1
            Try
                dts.Tables(0).Rows(i)("Concepto") = Concepto.MostrarDescripcion(CInt(dts.Tables(0).Rows(i)("CodigoConcepto").ToString()), "").ToString()
            Catch ex As Exception
                dts.Tables(0).Rows(i)("Concepto") = "Error, Concepto no Encontrado"
            End Try
        Next
        Return dts
    End Function
End Class
